<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "https://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
<meta http-equiv="X-UA-Compatible" content="IE=9"/>
<meta name="generator" content="Doxygen 1.8.17"/>
<meta name="viewport" content="width=device-width, initial-scale=1"/>
<title>Jetson Inference: jetson-utils/WebRTCServer.h Source File</title>
<link href="tabs.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="jquery.js"></script>
<script type="text/javascript" src="dynsections.js"></script>
<link href="navtree.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="resize.js"></script>
<script type="text/javascript" src="navtreedata.js"></script>
<script type="text/javascript" src="navtree.js"></script>
<link href="search/search.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="search/searchdata.js"></script>
<script type="text/javascript" src="search/search.js"></script>
<link href="doxygen.css" rel="stylesheet" type="text/css" />
</head>
<body>
<div id="top"><!-- do not remove this div, it is closed by doxygen! -->
<div id="titlearea">
<table cellspacing="0" cellpadding="0">
 <tbody>
 <tr style="height: 56px;">
  <td id="projectlogo"><img alt="Logo" src="NVLogo_2D.jpg"/></td>
  <td id="projectalign" style="padding-left: 0.5em;">
   <div id="projectname">Jetson Inference
   </div>
   <div id="projectbrief">DNN Vision Library</div>
  </td>
 </tr>
 </tbody>
</table>
</div>
<!-- end header part -->
<!-- Generated by Doxygen 1.8.17 -->
<script type="text/javascript">
/* @license magnet:?xt=urn:btih:cf05388f2679ee054f2beb29a391d25f4e673ac3&amp;dn=gpl-2.0.txt GPL-v2 */
var searchBox = new SearchBox("searchBox", "search",false,'Search');
/* @license-end */
</script>
<script type="text/javascript" src="menudata.js"></script>
<script type="text/javascript" src="menu.js"></script>
<script type="text/javascript">
/* @license magnet:?xt=urn:btih:cf05388f2679ee054f2beb29a391d25f4e673ac3&amp;dn=gpl-2.0.txt GPL-v2 */
$(function() {
  initMenu('',true,false,'search.php','Search');
  $(document).ready(function() { init_search(); });
});
/* @license-end */</script>
<div id="main-nav"></div>
</div><!-- top -->
<div id="side-nav" class="ui-resizable side-nav-resizable">
  <div id="nav-tree">
    <div id="nav-tree-contents">
      <div id="nav-sync" class="sync"></div>
    </div>
  </div>
  <div id="splitbar" style="-moz-user-select:none;" 
       class="ui-resizable-handle">
  </div>
</div>
<script type="text/javascript">
/* @license magnet:?xt=urn:btih:cf05388f2679ee054f2beb29a391d25f4e673ac3&amp;dn=gpl-2.0.txt GPL-v2 */
$(document).ready(function(){initNavTree('WebRTCServer_8h_source.html',''); initResizable(); });
/* @license-end */
</script>
<div id="doc-content">
<!-- window showing the filter options -->
<div id="MSearchSelectWindow"
     onmouseover="return searchBox.OnSearchSelectShow()"
     onmouseout="return searchBox.OnSearchSelectHide()"
     onkeydown="return searchBox.OnSearchSelectKey(event)">
</div>

<!-- iframe showing the search results (closed by default) -->
<div id="MSearchResultsWindow">
<iframe src="javascript:void(0)" frameborder="0" 
        name="MSearchResults" id="MSearchResults">
</iframe>
</div>

<div class="header">
  <div class="headertitle">
<div class="title">WebRTCServer.h</div>  </div>
</div><!--header-->
<div class="contents">
<a href="WebRTCServer_8h.html">Go to the documentation of this file.</a><div class="fragment"><div class="line"><a name="l00001"></a><span class="lineno">    1</span>&#160;<span class="comment">/*</span></div>
<div class="line"><a name="l00002"></a><span class="lineno">    2</span>&#160;<span class="comment"> * Copyright (c) 2022, NVIDIA CORPORATION. All rights reserved.</span></div>
<div class="line"><a name="l00003"></a><span class="lineno">    3</span>&#160;<span class="comment"> *</span></div>
<div class="line"><a name="l00004"></a><span class="lineno">    4</span>&#160;<span class="comment"> * Permission is hereby granted, free of charge, to any person obtaining a</span></div>
<div class="line"><a name="l00005"></a><span class="lineno">    5</span>&#160;<span class="comment"> * copy of this software and associated documentation files (the &quot;Software&quot;),</span></div>
<div class="line"><a name="l00006"></a><span class="lineno">    6</span>&#160;<span class="comment"> * to deal in the Software without restriction, including without limitation</span></div>
<div class="line"><a name="l00007"></a><span class="lineno">    7</span>&#160;<span class="comment"> * the rights to use, copy, modify, merge, publish, distribute, sublicense,</span></div>
<div class="line"><a name="l00008"></a><span class="lineno">    8</span>&#160;<span class="comment"> * and/or sell copies of the Software, and to permit persons to whom the</span></div>
<div class="line"><a name="l00009"></a><span class="lineno">    9</span>&#160;<span class="comment"> * Software is furnished to do so, subject to the following conditions:</span></div>
<div class="line"><a name="l00010"></a><span class="lineno">   10</span>&#160;<span class="comment"> *</span></div>
<div class="line"><a name="l00011"></a><span class="lineno">   11</span>&#160;<span class="comment"> * The above copyright notice and this permission notice shall be included in</span></div>
<div class="line"><a name="l00012"></a><span class="lineno">   12</span>&#160;<span class="comment"> * all copies or substantial portions of the Software.</span></div>
<div class="line"><a name="l00013"></a><span class="lineno">   13</span>&#160;<span class="comment"> *</span></div>
<div class="line"><a name="l00014"></a><span class="lineno">   14</span>&#160;<span class="comment"> * THE SOFTWARE IS PROVIDED &quot;AS IS&quot;, WITHOUT WARRANTY OF ANY KIND, EXPRESS OR</span></div>
<div class="line"><a name="l00015"></a><span class="lineno">   15</span>&#160;<span class="comment"> * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,</span></div>
<div class="line"><a name="l00016"></a><span class="lineno">   16</span>&#160;<span class="comment"> * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.  IN NO EVENT SHALL</span></div>
<div class="line"><a name="l00017"></a><span class="lineno">   17</span>&#160;<span class="comment"> * THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER</span></div>
<div class="line"><a name="l00018"></a><span class="lineno">   18</span>&#160;<span class="comment"> * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING</span></div>
<div class="line"><a name="l00019"></a><span class="lineno">   19</span>&#160;<span class="comment"> * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER</span></div>
<div class="line"><a name="l00020"></a><span class="lineno">   20</span>&#160;<span class="comment"> * DEALINGS IN THE SOFTWARE.</span></div>
<div class="line"><a name="l00021"></a><span class="lineno">   21</span>&#160;<span class="comment"> */</span></div>
<div class="line"><a name="l00022"></a><span class="lineno">   22</span>&#160; </div>
<div class="line"><a name="l00023"></a><span class="lineno">   23</span>&#160;<span class="preprocessor">#ifndef __WEBRTC_SERVER_H__</span></div>
<div class="line"><a name="l00024"></a><span class="lineno">   24</span>&#160;<span class="preprocessor">#define __WEBRTC_SERVER_H__</span></div>
<div class="line"><a name="l00025"></a><span class="lineno">   25</span>&#160; </div>
<div class="line"><a name="l00026"></a><span class="lineno">   26</span>&#160;<span class="preprocessor">#include &lt;libsoup/soup.h&gt;</span></div>
<div class="line"><a name="l00027"></a><span class="lineno">   27</span>&#160; </div>
<div class="line"><a name="l00028"></a><span class="lineno">   28</span>&#160;<span class="preprocessor">#include &lt;stdint.h&gt;</span></div>
<div class="line"><a name="l00029"></a><span class="lineno">   29</span>&#160;<span class="preprocessor">#include &lt;string&gt;</span></div>
<div class="line"><a name="l00030"></a><span class="lineno">   30</span>&#160;<span class="preprocessor">#include &lt;vector&gt;</span></div>
<div class="line"><a name="l00031"></a><span class="lineno">   31</span>&#160; </div>
<div class="line"><a name="l00032"></a><span class="lineno">   32</span>&#160; </div>
<div class="line"><a name="l00033"></a><span class="lineno">   33</span>&#160;<span class="comment">// forward declarations</span></div>
<div class="line"><a name="l00034"></a><span class="lineno">   34</span>&#160;<span class="keyword">class </span><a class="code" href="group__network.html#classWebRTCServer">WebRTCServer</a>;</div>
<div class="line"><a name="l00035"></a><span class="lineno">   35</span>&#160;<span class="keyword">class </span><a class="code" href="group__threads.html#classThread">Thread</a>;</div>
<div class="line"><a name="l00036"></a><span class="lineno">   36</span>&#160; </div>
<div class="line"><a name="l00037"></a><span class="lineno">   37</span>&#160; </div>
<div class="line"><a name="l00042"></a><span class="lineno"><a class="line" href="group__network.html#ga0168a2334e9e1e13b83a665c8cce0742">   42</a></span>&#160;<span class="preprocessor">#define WEBRTC_DEFAULT_PORT 41567</span></div>
<div class="line"><a name="l00043"></a><span class="lineno">   43</span>&#160; </div>
<div class="line"><a name="l00049"></a><span class="lineno"><a class="line" href="group__network.html#ga99b10c89b7c09a0c753f241f9e74c894">   49</a></span>&#160;<span class="preprocessor">#define WEBRTC_DEFAULT_STUN_SERVER &quot;stun.l.google.com:19302&quot;</span></div>
<div class="line"><a name="l00050"></a><span class="lineno">   50</span>&#160; </div>
<div class="line"><a name="l00055"></a><span class="lineno"><a class="line" href="group__network.html#ga14978cf9893d6b4dc89019227ac121e7">   55</a></span>&#160;<span class="preprocessor">#define LOG_WEBRTC &quot;[webrtc] &quot;</span></div>
<div class="line"><a name="l00056"></a><span class="lineno">   56</span>&#160; </div>
<div class="line"><a name="l00057"></a><span class="lineno">   57</span>&#160; </div>
<div class="line"><a name="l00062"></a><span class="lineno"><a class="line" href="group__network.html#gabfc2d28deff979bf1183220b57b78bd4">   62</a></span>&#160;<span class="keyword">enum</span> <a class="code" href="group__network.html#gabfc2d28deff979bf1183220b57b78bd4">WebRTCFlags</a></div>
<div class="line"><a name="l00063"></a><span class="lineno">   63</span>&#160;{</div>
<div class="line"><a name="l00064"></a><span class="lineno">   64</span>&#160;        <span class="comment">// route/stream flags</span></div>
<div class="line"><a name="l00065"></a><span class="lineno"><a class="line" href="group__network.html#ggabfc2d28deff979bf1183220b57b78bd4a819f229f6bfeb116f686451ecdec02f0">   65</a></span>&#160;        <a class="code" href="group__network.html#ggabfc2d28deff979bf1183220b57b78bd4a819f229f6bfeb116f686451ecdec02f0">WEBRTC_PRIVATE</a> = 0,                             <span class="comment">// hidden (default)             </span></div>
<div class="line"><a name="l00066"></a><span class="lineno"><a class="line" href="group__network.html#ggabfc2d28deff979bf1183220b57b78bd4a6679628f8219a94c62e06c70190bbf93">   66</a></span>&#160;        <a class="code" href="group__network.html#ggabfc2d28deff979bf1183220b57b78bd4a6679628f8219a94c62e06c70190bbf93">WEBRTC_PUBLIC</a>  = (1 &lt;&lt; 1),              <span class="comment">// allow discoverability</span></div>
<div class="line"><a name="l00067"></a><span class="lineno"><a class="line" href="group__network.html#ggabfc2d28deff979bf1183220b57b78bd4ae076480a0c0d9a717f926b7cda1744fd">   67</a></span>&#160;        <a class="code" href="group__network.html#ggabfc2d28deff979bf1183220b57b78bd4ae076480a0c0d9a717f926b7cda1744fd">WEBRTC_AUDIO</a>   = (1 &lt;&lt; 0),              <span class="comment">// produces/accepts video</span></div>
<div class="line"><a name="l00068"></a><span class="lineno"><a class="line" href="group__network.html#ggabfc2d28deff979bf1183220b57b78bd4a98eb7641bdbb1edc5fe77bdd3e3650ab">   68</a></span>&#160;        <a class="code" href="group__network.html#ggabfc2d28deff979bf1183220b57b78bd4a98eb7641bdbb1edc5fe77bdd3e3650ab">WEBRTC_VIDEO</a>   = (1 &lt;&lt; 1),              <span class="comment">// produces/accepts audio</span></div>
<div class="line"><a name="l00069"></a><span class="lineno"><a class="line" href="group__network.html#ggabfc2d28deff979bf1183220b57b78bd4add7aa55d55c61e54ef02a9d6561b38d3">   69</a></span>&#160;        <a class="code" href="group__network.html#ggabfc2d28deff979bf1183220b57b78bd4add7aa55d55c61e54ef02a9d6561b38d3">WEBRTC_SEND</a>     = (1 &lt;&lt; 2),             <span class="comment">// server sends to the client (outgoing)</span></div>
<div class="line"><a name="l00070"></a><span class="lineno"><a class="line" href="group__network.html#ggabfc2d28deff979bf1183220b57b78bd4aa0b0d71eedf0e9cb89dad480acf2a808">   70</a></span>&#160;        <a class="code" href="group__network.html#ggabfc2d28deff979bf1183220b57b78bd4aa0b0d71eedf0e9cb89dad480acf2a808">WEBRTC_RECEIVE</a> = (1 &lt;&lt; 3),              <span class="comment">// server receives from the client (incoming)</span></div>
<div class="line"><a name="l00071"></a><span class="lineno"><a class="line" href="group__network.html#ggabfc2d28deff979bf1183220b57b78bd4a25abb9f2f31e749534b50835291d40f0">   71</a></span>&#160;        <a class="code" href="group__network.html#ggabfc2d28deff979bf1183220b57b78bd4a25abb9f2f31e749534b50835291d40f0">WEBRTC_MULTI_CLIENT</a> = (1 &lt;&lt; 4), <span class="comment">// can connect with multiple clients simultaneously</span></div>
<div class="line"><a name="l00072"></a><span class="lineno">   72</span>&#160;        </div>
<div class="line"><a name="l00073"></a><span class="lineno">   73</span>&#160;        <span class="comment">// state flags</span></div>
<div class="line"><a name="l00074"></a><span class="lineno"><a class="line" href="group__network.html#ggabfc2d28deff979bf1183220b57b78bd4a66831e34a5556976064e4d62e5fcc753">   74</a></span>&#160;        <a class="code" href="group__network.html#ggabfc2d28deff979bf1183220b57b78bd4a66831e34a5556976064e4d62e5fcc753">WEBRTC_PEER_CONNECTING</a> = (1 &lt;&lt; 5),      <span class="comment">// the peer is connecting</span></div>
<div class="line"><a name="l00075"></a><span class="lineno"><a class="line" href="group__network.html#ggabfc2d28deff979bf1183220b57b78bd4ad0e08bdd9c1c0a10e019235f9e341278">   75</a></span>&#160;        <a class="code" href="group__network.html#ggabfc2d28deff979bf1183220b57b78bd4ad0e08bdd9c1c0a10e019235f9e341278">WEBRTC_PEER_CONNECTED</a>  = (1 &lt;&lt; 6),      <span class="comment">// the peer is ready</span></div>
<div class="line"><a name="l00076"></a><span class="lineno"><a class="line" href="group__network.html#ggabfc2d28deff979bf1183220b57b78bd4a02bfc67384ac6c23bde10f88d829fb09">   76</a></span>&#160;        <a class="code" href="group__network.html#ggabfc2d28deff979bf1183220b57b78bd4a02bfc67384ac6c23bde10f88d829fb09">WEBRTC_PEER_STREAMING</a>  = (1 &lt;&lt; 7),      <span class="comment">// the peer is streaming</span></div>
<div class="line"><a name="l00077"></a><span class="lineno"><a class="line" href="group__network.html#ggabfc2d28deff979bf1183220b57b78bd4a1a11199124c60fea07d424d28aaa072c">   77</a></span>&#160;        <a class="code" href="group__network.html#ggabfc2d28deff979bf1183220b57b78bd4a1a11199124c60fea07d424d28aaa072c">WEBRTC_PEER_CLOSED</a>     = (1 &lt;&lt; 8),      <span class="comment">// the peer has closed</span></div>
<div class="line"><a name="l00078"></a><span class="lineno">   78</span>&#160;};</div>
<div class="line"><a name="l00079"></a><span class="lineno">   79</span>&#160; </div>
<div class="line"><a name="l00080"></a><span class="lineno">   80</span>&#160; </div>
<div class="line"><a name="l00085"></a><span class="lineno"><a class="line" href="group__network.html">   85</a></span>&#160;<span class="keyword">struct </span><a class="code" href="group__network.html#structWebRTCPeer">WebRTCPeer</a></div>
<div class="line"><a name="l00086"></a><span class="lineno">   86</span>&#160;{</div>
<div class="line"><a name="l00087"></a><span class="lineno"><a class="line" href="group__network.html#af3a86d05b7dcb3795cb9a90b87a5fc14">   87</a></span>&#160;        SoupWebsocketConnection* <a class="code" href="group__network.html#af3a86d05b7dcb3795cb9a90b87a5fc14">connection</a>;</div>
<div class="line"><a name="l00088"></a><span class="lineno"><a class="line" href="group__network.html#a803ff5def7a8be36e0fc0f84513845f8">   88</a></span>&#160;        SoupClientContext* <a class="code" href="group__network.html#a803ff5def7a8be36e0fc0f84513845f8">client_context</a>;</div>
<div class="line"><a name="l00089"></a><span class="lineno"><a class="line" href="group__network.html#a8a3cfd24818f03363a8126037c77a26d">   89</a></span>&#160;        <a class="code" href="group__network.html#classWebRTCServer">WebRTCServer</a>* <a class="code" href="group__network.html#a8a3cfd24818f03363a8126037c77a26d">server</a>;</div>
<div class="line"><a name="l00090"></a><span class="lineno">   90</span>&#160; </div>
<div class="line"><a name="l00091"></a><span class="lineno"><a class="line" href="group__network.html#a77e751082f73a3cd53dd5e6060526d1e">   91</a></span>&#160;        uint32_t <a class="code" href="group__network.html#a77e751082f73a3cd53dd5e6060526d1e">ID</a>;                    <span class="comment">// unique ID</span></div>
<div class="line"><a name="l00092"></a><span class="lineno"><a class="line" href="group__network.html#a6b3508b0c436b367cc4a95080df26d9f">   92</a></span>&#160;        uint32_t <a class="code" href="group__network.html#a6b3508b0c436b367cc4a95080df26d9f">flags</a>;         <span class="comment">// WebRTCFlags</span></div>
<div class="line"><a name="l00093"></a><span class="lineno">   93</span>&#160; </div>
<div class="line"><a name="l00094"></a><span class="lineno"><a class="line" href="group__network.html#ac3738d6e644d182fd8cd46bb600cebf5">   94</a></span>&#160;        std::string <a class="code" href="group__network.html#ac3738d6e644d182fd8cd46bb600cebf5">path</a>;       <span class="comment">// the route the peer is connected on</span></div>
<div class="line"><a name="l00095"></a><span class="lineno"><a class="line" href="group__network.html#ad9ecc5b68fb8b8a00e26e4fff273ad9a">   95</a></span>&#160;        std::string <a class="code" href="group__network.html#ad9ecc5b68fb8b8a00e26e4fff273ad9a">ip_address</a>; <span class="comment">// IP address of the peer</span></div>
<div class="line"><a name="l00096"></a><span class="lineno">   96</span>&#160;        </div>
<div class="line"><a name="l00097"></a><span class="lineno"><a class="line" href="group__network.html#a2a7aa8d3dbc1a006db68d1508a54d0d6">   97</a></span>&#160;        <span class="keywordtype">void</span>* <a class="code" href="group__network.html#a2a7aa8d3dbc1a006db68d1508a54d0d6">user_data</a>;                <span class="comment">// private data for the route handler</span></div>
<div class="line"><a name="l00098"></a><span class="lineno">   98</span>&#160;};</div>
<div class="line"><a name="l00099"></a><span class="lineno">   99</span>&#160; </div>
<div class="line"><a name="l00100"></a><span class="lineno">  100</span>&#160; </div>
<div class="line"><a name="l00116"></a><span class="lineno"><a class="line" href="group__network.html">  116</a></span>&#160;<span class="keyword">class </span><a class="code" href="group__network.html#classWebRTCServer">WebRTCServer</a></div>
<div class="line"><a name="l00117"></a><span class="lineno">  117</span>&#160;{</div>
<div class="line"><a name="l00118"></a><span class="lineno">  118</span>&#160;<span class="keyword">public</span>:</div>
<div class="line"><a name="l00123"></a><span class="lineno">  123</span>&#160;        <span class="keyword">static</span> <a class="code" href="group__network.html#classWebRTCServer">WebRTCServer</a>* <a class="code" href="group__network.html#a49631104e63bd4368ecb0217c402b4e7">Create</a>( uint16_t port=<a class="code" href="group__network.html#ga0168a2334e9e1e13b83a665c8cce0742">WEBRTC_DEFAULT_PORT</a>, </div>
<div class="line"><a name="l00124"></a><span class="lineno">  124</span>&#160;                                                    <span class="keyword">const</span> <span class="keywordtype">char</span>* stun_server=<a class="code" href="group__network.html#ga99b10c89b7c09a0c753f241f9e74c894">WEBRTC_DEFAULT_STUN_SERVER</a>,</div>
<div class="line"><a name="l00125"></a><span class="lineno">  125</span>&#160;                                                    <span class="keyword">const</span> <span class="keywordtype">char</span>* ssl_cert=NULL, <span class="keyword">const</span> <span class="keywordtype">char</span>* ssl_key=NULL,</div>
<div class="line"><a name="l00126"></a><span class="lineno">  126</span>&#160;                                                    <span class="keywordtype">bool</span> threaded=<span class="keyword">true</span> );       </div>
<div class="line"><a name="l00127"></a><span class="lineno">  127</span>&#160;        </div>
<div class="line"><a name="l00132"></a><span class="lineno">  132</span>&#160;        <span class="keywordtype">void</span> <a class="code" href="group__network.html#aeb70147a334c7f4aa526523707d316b9">Release</a>();</div>
<div class="line"><a name="l00133"></a><span class="lineno">  133</span>&#160;        </div>
<div class="line"><a name="l00138"></a><span class="lineno"><a class="line" href="group__network.html#a87c958251b5146e420439d6cd0ed2867">  138</a></span>&#160;        <span class="keyword">typedef</span> void (*<a class="code" href="group__network.html#a87c958251b5146e420439d6cd0ed2867">WebsocketListener</a>)( <a class="code" href="group__network.html#structWebRTCPeer">WebRTCPeer</a>* peer, <span class="keyword">const</span> <span class="keywordtype">char</span>* message, <span class="keywordtype">size_t</span> message_size, <span class="keywordtype">void</span>* user_data );</div>
<div class="line"><a name="l00139"></a><span class="lineno">  139</span>&#160; </div>
<div class="line"><a name="l00144"></a><span class="lineno"><a class="line" href="group__network.html#a0a9229009aca73f62c363f879255bb38">  144</a></span>&#160;        <span class="keyword">typedef</span> SoupServerCallback <a class="code" href="group__network.html#a0a9229009aca73f62c363f879255bb38">HttpListener</a>;</div>
<div class="line"><a name="l00145"></a><span class="lineno">  145</span>&#160; </div>
<div class="line"><a name="l00153"></a><span class="lineno">  153</span>&#160;        <span class="keywordtype">void</span> <a class="code" href="group__network.html#a5d584e6f650648aad396f1873984c621">AddRoute</a>( <span class="keyword">const</span> <span class="keywordtype">char</span>* path, <a class="code" href="group__network.html#a0a9229009aca73f62c363f879255bb38">HttpListener</a> callback, <span class="keywordtype">void</span>* user_data=NULL, uint32_t flags=0 );</div>
<div class="line"><a name="l00154"></a><span class="lineno">  154</span>&#160; </div>
<div class="line"><a name="l00170"></a><span class="lineno">  170</span>&#160;        <span class="keywordtype">void</span> <a class="code" href="group__network.html#a5d584e6f650648aad396f1873984c621">AddRoute</a>( <span class="keyword">const</span> <span class="keywordtype">char</span>* path, <a class="code" href="group__network.html#a87c958251b5146e420439d6cd0ed2867">WebsocketListener</a> callback, <span class="keywordtype">void</span>* user_data=NULL, uint32_t flags=0 );</div>
<div class="line"><a name="l00171"></a><span class="lineno">  171</span>&#160; </div>
<div class="line"><a name="l00177"></a><span class="lineno"><a class="line" href="group__network.html#ad3927daf271af5dead4f21a9a2ff1ac3">  177</a></span>&#160;        <span class="keyword">inline</span> <span class="keyword">const</span> <span class="keywordtype">char</span>* <a class="code" href="group__network.html#ad3927daf271af5dead4f21a9a2ff1ac3">GetSTUNServer</a>()<span class="keyword"> const                </span>{ <span class="keywordflow">return</span> <a class="code" href="group__network.html#ae4ec44a6d8bdcd422b38082689511c66">mStunServer</a>.c_str(); }</div>
<div class="line"><a name="l00178"></a><span class="lineno">  178</span>&#160;        </div>
<div class="line"><a name="l00183"></a><span class="lineno"><a class="line" href="group__network.html#adbcd3355338382847a31e5e49f5caf97">  183</a></span>&#160;        <span class="keyword">inline</span> <span class="keywordtype">bool</span> <a class="code" href="group__network.html#adbcd3355338382847a31e5e49f5caf97">HasHTTPS</a>()<span class="keyword"> const                                    </span>{ <span class="keywordflow">return</span> <a class="code" href="group__network.html#acf3e2efff7428476b75b74f5199bc06b">mHasHTTPS</a>; }</div>
<div class="line"><a name="l00184"></a><span class="lineno">  184</span>&#160;        </div>
<div class="line"><a name="l00189"></a><span class="lineno"><a class="line" href="group__network.html#a32e99e59a4d0c536e7edcfbbd2dcdaee">  189</a></span>&#160;        <span class="keyword">inline</span> <span class="keywordtype">bool</span> <a class="code" href="group__network.html#a32e99e59a4d0c536e7edcfbbd2dcdaee">IsThreaded</a>()<span class="keyword"> const                          </span>{ <span class="keywordflow">return</span> (<a class="code" href="group__network.html#a229d7bef55546e26fe49056465616831">mThread</a> != NULL); }</div>
<div class="line"><a name="l00190"></a><span class="lineno">  190</span>&#160;        </div>
<div class="line"><a name="l00196"></a><span class="lineno">  196</span>&#160;        <span class="keywordtype">bool</span> <a class="code" href="group__network.html#ac49ab53764ab184efe91a8c7040be7dc">ProcessRequests</a>( <span class="keywordtype">bool</span> blocking=<span class="keyword">false</span> );</div>
<div class="line"><a name="l00197"></a><span class="lineno">  197</span>&#160;        </div>
<div class="line"><a name="l00198"></a><span class="lineno">  198</span>&#160;<span class="keyword">protected</span>:</div>
<div class="line"><a name="l00199"></a><span class="lineno">  199</span>&#160; </div>
<div class="line"><a name="l00200"></a><span class="lineno">  200</span>&#160;        <a class="code" href="group__network.html#a91c2b446fe98224e7bd66693ccd19e21">WebRTCServer</a>( uint16_t port, <span class="keyword">const</span> <span class="keywordtype">char</span>* stun_server, <span class="keyword">const</span> <span class="keywordtype">char</span>* ssl_cert_file, <span class="keyword">const</span> <span class="keywordtype">char</span>* ssl_key_file, <span class="keywordtype">bool</span> threaded );</div>
<div class="line"><a name="l00201"></a><span class="lineno">  201</span>&#160;        <a class="code" href="group__network.html#a59493ccab3274ddd2930e903ba770f1d">~WebRTCServer</a>();</div>
<div class="line"><a name="l00202"></a><span class="lineno">  202</span>&#160;        </div>
<div class="line"><a name="l00203"></a><span class="lineno">  203</span>&#160;        <span class="keywordtype">bool</span> <a class="code" href="group__network.html#aed89521ec525e2a3c24757d2444f388d">init</a>();</div>
<div class="line"><a name="l00204"></a><span class="lineno">  204</span>&#160; </div>
<div class="line"><a name="l00205"></a><span class="lineno">  205</span>&#160;        <span class="keyword">static</span> <span class="keywordtype">void</span>* <a class="code" href="group__network.html#af67a297932aefb380d6f691c23e2a4e0">runThread</a>( <span class="keywordtype">void</span>* user_data );</div>
<div class="line"><a name="l00206"></a><span class="lineno">  206</span>&#160;        </div>
<div class="line"><a name="l00207"></a><span class="lineno">  207</span>&#160;        <span class="keyword">static</span> <span class="keywordtype">void</span> <a class="code" href="group__network.html#ad44d43978599476a12539802ff434d21">onHttpRequest</a>( SoupServer* soup_server, SoupMessage* message, <span class="keyword">const</span> <span class="keywordtype">char</span>* path, GHashTable* query, SoupClientContext* client_context, <span class="keywordtype">void</span>* user_data );</div>
<div class="line"><a name="l00208"></a><span class="lineno">  208</span>&#160;        <span class="keyword">static</span> <span class="keywordtype">void</span> <a class="code" href="group__network.html#a495cc40be78a8cda04c03e30242ccbfa">onHttpDefault</a>( SoupServer* soup_server, SoupMessage* message, <span class="keyword">const</span> <span class="keywordtype">char</span>* path, GHashTable* query, SoupClientContext* client_context, <span class="keywordtype">void</span>* user_data );</div>
<div class="line"><a name="l00209"></a><span class="lineno">  209</span>&#160;        </div>
<div class="line"><a name="l00210"></a><span class="lineno">  210</span>&#160;        <span class="keyword">static</span> <span class="keywordtype">void</span> <a class="code" href="group__network.html#a7d50ecf2c197872b45d86adc5aeba0da">onWebsocketOpened</a>( SoupServer* server, SoupWebsocketConnection* connection, <span class="keyword">const</span> <span class="keywordtype">char</span> *path, SoupClientContext* client_context, <span class="keywordtype">void</span>* user_data );</div>
<div class="line"><a name="l00211"></a><span class="lineno">  211</span>&#160;        <span class="keyword">static</span> <span class="keywordtype">void</span> <a class="code" href="group__network.html#a0b94ce7618d8d4c7a8d4e66f674f958e">onWebsocketMessage</a>( SoupWebsocketConnection* connection, SoupWebsocketDataType data_type, GBytes* message, <span class="keywordtype">void</span>* user_data );</div>
<div class="line"><a name="l00212"></a><span class="lineno">  212</span>&#160;        <span class="keyword">static</span> <span class="keywordtype">void</span> <a class="code" href="group__network.html#aa4b1d80e74f1bcdcd5e5366ca36e50a2">onWebsocketClosed</a>( SoupWebsocketConnection* connection, <span class="keywordtype">void</span>* user_data );</div>
<div class="line"><a name="l00213"></a><span class="lineno">  213</span>&#160;        </div>
<div class="line"><a name="l00214"></a><span class="lineno"><a class="line" href="structWebRTCServer_1_1HttpRoute.html">  214</a></span>&#160;        <span class="keyword">struct </span><a class="code" href="structWebRTCServer_1_1HttpRoute.html">HttpRoute</a></div>
<div class="line"><a name="l00215"></a><span class="lineno">  215</span>&#160;        {</div>
<div class="line"><a name="l00216"></a><span class="lineno"><a class="line" href="structWebRTCServer_1_1HttpRoute.html#a04682f5f68e3c1fcd6ede73f62941777">  216</a></span>&#160;                std::string <a class="code" href="structWebRTCServer_1_1HttpRoute.html#a04682f5f68e3c1fcd6ede73f62941777">path</a>;</div>
<div class="line"><a name="l00217"></a><span class="lineno"><a class="line" href="structWebRTCServer_1_1HttpRoute.html#a3f0724d2bfb6b5e06aa28e91879c6444">  217</a></span>&#160;                <a class="code" href="group__network.html#a0a9229009aca73f62c363f879255bb38">HttpListener</a> <a class="code" href="structWebRTCServer_1_1HttpRoute.html#a3f0724d2bfb6b5e06aa28e91879c6444">callback</a>;</div>
<div class="line"><a name="l00218"></a><span class="lineno"><a class="line" href="structWebRTCServer_1_1HttpRoute.html#a920c9860af27d158470f42ead7cb91df">  218</a></span>&#160;                <span class="keywordtype">void</span>* <a class="code" href="structWebRTCServer_1_1HttpRoute.html#a920c9860af27d158470f42ead7cb91df">user_data</a>;</div>
<div class="line"><a name="l00219"></a><span class="lineno"><a class="line" href="structWebRTCServer_1_1HttpRoute.html#aff666687e8ad59351fe3b54e091f115f">  219</a></span>&#160;                uint32_t <a class="code" href="structWebRTCServer_1_1HttpRoute.html#aff666687e8ad59351fe3b54e091f115f">flags</a>;</div>
<div class="line"><a name="l00220"></a><span class="lineno">  220</span>&#160;        };</div>
<div class="line"><a name="l00221"></a><span class="lineno">  221</span>&#160;        </div>
<div class="line"><a name="l00222"></a><span class="lineno"><a class="line" href="structWebRTCServer_1_1WebsocketRoute.html">  222</a></span>&#160;        <span class="keyword">struct </span><a class="code" href="structWebRTCServer_1_1WebsocketRoute.html">WebsocketRoute</a></div>
<div class="line"><a name="l00223"></a><span class="lineno">  223</span>&#160;        {</div>
<div class="line"><a name="l00224"></a><span class="lineno"><a class="line" href="structWebRTCServer_1_1WebsocketRoute.html#a8ca5ffb081600a7f8f09b63be3d8b030">  224</a></span>&#160;                std::string <a class="code" href="structWebRTCServer_1_1WebsocketRoute.html#a8ca5ffb081600a7f8f09b63be3d8b030">path</a>;</div>
<div class="line"><a name="l00225"></a><span class="lineno"><a class="line" href="structWebRTCServer_1_1WebsocketRoute.html#ae009455262ee0547eec6cc6d5c3fc3a1">  225</a></span>&#160;                <a class="code" href="group__network.html#a87c958251b5146e420439d6cd0ed2867">WebsocketListener</a> <a class="code" href="structWebRTCServer_1_1WebsocketRoute.html#ae009455262ee0547eec6cc6d5c3fc3a1">callback</a>;</div>
<div class="line"><a name="l00226"></a><span class="lineno"><a class="line" href="structWebRTCServer_1_1WebsocketRoute.html#a2a1b71fad54d8716f06d721451fc2e4f">  226</a></span>&#160;                <span class="keywordtype">void</span>* <a class="code" href="structWebRTCServer_1_1WebsocketRoute.html#a2a1b71fad54d8716f06d721451fc2e4f">user_data</a>;</div>
<div class="line"><a name="l00227"></a><span class="lineno"><a class="line" href="structWebRTCServer_1_1WebsocketRoute.html#ae663b161b5c3bb3177f0116f4c71ad5c">  227</a></span>&#160;                uint32_t <a class="code" href="structWebRTCServer_1_1WebsocketRoute.html#ae663b161b5c3bb3177f0116f4c71ad5c">flags</a>;</div>
<div class="line"><a name="l00228"></a><span class="lineno"><a class="line" href="structWebRTCServer_1_1WebsocketRoute.html#aafe530e21a178e9b052b597ecf6a036e">  228</a></span>&#160;                std::vector&lt;WebRTCPeer*&gt; <a class="code" href="structWebRTCServer_1_1WebsocketRoute.html#aafe530e21a178e9b052b597ecf6a036e">peers</a>;</div>
<div class="line"><a name="l00229"></a><span class="lineno">  229</span>&#160;        };</div>
<div class="line"><a name="l00230"></a><span class="lineno">  230</span>&#160; </div>
<div class="line"><a name="l00231"></a><span class="lineno">  231</span>&#160;        <a class="code" href="structWebRTCServer_1_1HttpRoute.html">HttpRoute</a>* <a class="code" href="group__network.html#a0d039ca61131cbe7accdce277a5629a9">findHttpRoute</a>( <span class="keyword">const</span> <span class="keywordtype">char</span>* path ) <span class="keyword">const</span>;</div>
<div class="line"><a name="l00232"></a><span class="lineno">  232</span>&#160;        <a class="code" href="structWebRTCServer_1_1WebsocketRoute.html">WebsocketRoute</a>* <a class="code" href="group__network.html#a74f5de3572ef64def2be980efafd45e8">findWebsocketRoute</a>( <span class="keyword">const</span> <span class="keywordtype">char</span>* path ) <span class="keyword">const</span>;</div>
<div class="line"><a name="l00233"></a><span class="lineno">  233</span>&#160;        </div>
<div class="line"><a name="l00234"></a><span class="lineno">  234</span>&#160;        <span class="keywordtype">void</span> <a class="code" href="group__network.html#a2221f9f1ba155c17f6d1f4e99057f7ba">freeRoute</a>( <a class="code" href="structWebRTCServer_1_1HttpRoute.html">HttpRoute</a>* route );</div>
<div class="line"><a name="l00235"></a><span class="lineno">  235</span>&#160;        <span class="keywordtype">void</span> <a class="code" href="group__network.html#a2221f9f1ba155c17f6d1f4e99057f7ba">freeRoute</a>( <a class="code" href="structWebRTCServer_1_1WebsocketRoute.html">WebsocketRoute</a>* route );</div>
<div class="line"><a name="l00236"></a><span class="lineno">  236</span>&#160;        </div>
<div class="line"><a name="l00237"></a><span class="lineno">  237</span>&#160;        std::string <a class="code" href="group__network.html#ac7e9dc3e13c0d61c2b85819ef88fc5b7">printRouteInfo</a>( <a class="code" href="structWebRTCServer_1_1WebsocketRoute.html">WebsocketRoute</a>* route ) <span class="keyword">const</span>;</div>
<div class="line"><a name="l00238"></a><span class="lineno">  238</span>&#160;        <span class="comment">//std::string printRouteList();</span></div>
<div class="line"><a name="l00239"></a><span class="lineno">  239</span>&#160;        </div>
<div class="line"><a name="l00240"></a><span class="lineno"><a class="line" href="group__network.html#a3afcb67c4dfc05a2cf80bac068b97146">  240</a></span>&#160;        std::vector&lt;HttpRoute*&gt; <a class="code" href="group__network.html#a3afcb67c4dfc05a2cf80bac068b97146">mHttpRoutes</a>;</div>
<div class="line"><a name="l00241"></a><span class="lineno"><a class="line" href="group__network.html#a67b529a7a9e37f892fb93b7409a2035f">  241</a></span>&#160;        std::vector&lt;WebsocketRoute*&gt; <a class="code" href="group__network.html#a67b529a7a9e37f892fb93b7409a2035f">mWebsocketRoutes</a>;</div>
<div class="line"><a name="l00242"></a><span class="lineno">  242</span>&#160;        </div>
<div class="line"><a name="l00243"></a><span class="lineno"><a class="line" href="group__network.html#a357507a6bd6da2cb41e90148f226b740">  243</a></span>&#160;        SoupServer* <a class="code" href="group__network.html#a357507a6bd6da2cb41e90148f226b740">mSoupServer</a>;</div>
<div class="line"><a name="l00244"></a><span class="lineno"><a class="line" href="group__network.html#ae4ec44a6d8bdcd422b38082689511c66">  244</a></span>&#160;        std::string <a class="code" href="group__network.html#ae4ec44a6d8bdcd422b38082689511c66">mStunServer</a>;</div>
<div class="line"><a name="l00245"></a><span class="lineno">  245</span>&#160;        </div>
<div class="line"><a name="l00246"></a><span class="lineno"><a class="line" href="group__network.html#ac00aed03b4a8aa98ae5b3f5088a80f9a">  246</a></span>&#160;        std::string <a class="code" href="group__network.html#ac00aed03b4a8aa98ae5b3f5088a80f9a">mSSLCertFile</a>;</div>
<div class="line"><a name="l00247"></a><span class="lineno"><a class="line" href="group__network.html#a333a035d9db6dea40816f8685fda5b24">  247</a></span>&#160;        std::string <a class="code" href="group__network.html#a333a035d9db6dea40816f8685fda5b24">mSSLKeyFile</a>;</div>
<div class="line"><a name="l00248"></a><span class="lineno">  248</span>&#160;        </div>
<div class="line"><a name="l00249"></a><span class="lineno"><a class="line" href="group__network.html#acf3e2efff7428476b75b74f5199bc06b">  249</a></span>&#160;        <span class="keywordtype">bool</span> <a class="code" href="group__network.html#acf3e2efff7428476b75b74f5199bc06b">mHasHTTPS</a>;</div>
<div class="line"><a name="l00250"></a><span class="lineno">  250</span>&#160;        </div>
<div class="line"><a name="l00251"></a><span class="lineno"><a class="line" href="group__network.html#a4c5e2f97d7cbd9cf4083aeff416dc5cc">  251</a></span>&#160;        uint16_t <a class="code" href="group__network.html#a4c5e2f97d7cbd9cf4083aeff416dc5cc">mPort</a>;</div>
<div class="line"><a name="l00252"></a><span class="lineno"><a class="line" href="group__network.html#a1eb643c9200b6229942cc5e7bf8c8f56">  252</a></span>&#160;        uint32_t <a class="code" href="group__network.html#a1eb643c9200b6229942cc5e7bf8c8f56">mRefCount</a>;</div>
<div class="line"><a name="l00253"></a><span class="lineno"><a class="line" href="group__network.html#a437e4568ee60de9a5e94dfe62763e2fc">  253</a></span>&#160;        uint32_t <a class="code" href="group__network.html#a437e4568ee60de9a5e94dfe62763e2fc">mPeerCount</a>;</div>
<div class="line"><a name="l00254"></a><span class="lineno">  254</span>&#160;        </div>
<div class="line"><a name="l00255"></a><span class="lineno"><a class="line" href="group__network.html#a229d7bef55546e26fe49056465616831">  255</a></span>&#160;        <a class="code" href="group__threads.html#classThread">Thread</a>* <a class="code" href="group__network.html#a229d7bef55546e26fe49056465616831">mThread</a>;</div>
<div class="line"><a name="l00256"></a><span class="lineno">  256</span>&#160;};</div>
<div class="line"><a name="l00257"></a><span class="lineno">  257</span>&#160; </div>
<div class="line"><a name="l00258"></a><span class="lineno">  258</span>&#160;<span class="preprocessor">#endif</span></div>
</div><!-- fragment --></div><!-- contents -->
</div><!-- doc-content -->
<div class="ttc" id="agroup__network_html_ad3927daf271af5dead4f21a9a2ff1ac3"><div class="ttname"><a href="group__network.html#ad3927daf271af5dead4f21a9a2ff1ac3">WebRTCServer::GetSTUNServer</a></div><div class="ttdeci">const char * GetSTUNServer() const</div><div class="ttdoc">Get the STUN server being used.</div><div class="ttdef"><b>Definition:</b> WebRTCServer.h:177</div></div>
<div class="ttc" id="agroup__network_html_ac7e9dc3e13c0d61c2b85819ef88fc5b7"><div class="ttname"><a href="group__network.html#ac7e9dc3e13c0d61c2b85819ef88fc5b7">WebRTCServer::printRouteInfo</a></div><div class="ttdeci">std::string printRouteInfo(WebsocketRoute *route) const</div></div>
<div class="ttc" id="agroup__network_html_a8a3cfd24818f03363a8126037c77a26d"><div class="ttname"><a href="group__network.html#a8a3cfd24818f03363a8126037c77a26d">WebRTCPeer::server</a></div><div class="ttdeci">WebRTCServer * server</div><div class="ttdef"><b>Definition:</b> WebRTCServer.h:89</div></div>
<div class="ttc" id="agroup__network_html_a59493ccab3274ddd2930e903ba770f1d"><div class="ttname"><a href="group__network.html#a59493ccab3274ddd2930e903ba770f1d">WebRTCServer::~WebRTCServer</a></div><div class="ttdeci">~WebRTCServer()</div></div>
<div class="ttc" id="agroup__network_html_ae4ec44a6d8bdcd422b38082689511c66"><div class="ttname"><a href="group__network.html#ae4ec44a6d8bdcd422b38082689511c66">WebRTCServer::mStunServer</a></div><div class="ttdeci">std::string mStunServer</div><div class="ttdef"><b>Definition:</b> WebRTCServer.h:244</div></div>
<div class="ttc" id="agroup__network_html_a333a035d9db6dea40816f8685fda5b24"><div class="ttname"><a href="group__network.html#a333a035d9db6dea40816f8685fda5b24">WebRTCServer::mSSLKeyFile</a></div><div class="ttdeci">std::string mSSLKeyFile</div><div class="ttdef"><b>Definition:</b> WebRTCServer.h:247</div></div>
<div class="ttc" id="agroup__network_html_a437e4568ee60de9a5e94dfe62763e2fc"><div class="ttname"><a href="group__network.html#a437e4568ee60de9a5e94dfe62763e2fc">WebRTCServer::mPeerCount</a></div><div class="ttdeci">uint32_t mPeerCount</div><div class="ttdef"><b>Definition:</b> WebRTCServer.h:253</div></div>
<div class="ttc" id="astructWebRTCServer_1_1HttpRoute_html_a04682f5f68e3c1fcd6ede73f62941777"><div class="ttname"><a href="structWebRTCServer_1_1HttpRoute.html#a04682f5f68e3c1fcd6ede73f62941777">WebRTCServer::HttpRoute::path</a></div><div class="ttdeci">std::string path</div><div class="ttdef"><b>Definition:</b> WebRTCServer.h:216</div></div>
<div class="ttc" id="agroup__network_html_a5d584e6f650648aad396f1873984c621"><div class="ttname"><a href="group__network.html#a5d584e6f650648aad396f1873984c621">WebRTCServer::AddRoute</a></div><div class="ttdeci">void AddRoute(const char *path, HttpListener callback, void *user_data=NULL, uint32_t flags=0)</div><div class="ttdoc">Register a function to handle incoming http/www requests at the specified path.</div></div>
<div class="ttc" id="agroup__network_html_a2a7aa8d3dbc1a006db68d1508a54d0d6"><div class="ttname"><a href="group__network.html#a2a7aa8d3dbc1a006db68d1508a54d0d6">WebRTCPeer::user_data</a></div><div class="ttdeci">void * user_data</div><div class="ttdef"><b>Definition:</b> WebRTCServer.h:97</div></div>
<div class="ttc" id="agroup__network_html_a87c958251b5146e420439d6cd0ed2867"><div class="ttname"><a href="group__network.html#a87c958251b5146e420439d6cd0ed2867">WebRTCServer::WebsocketListener</a></div><div class="ttdeci">void(* WebsocketListener)(WebRTCPeer *peer, const char *message, size_t message_size, void *user_data)</div><div class="ttdoc">Function pointer to a callback for handling websocket requests.</div><div class="ttdef"><b>Definition:</b> WebRTCServer.h:138</div></div>
<div class="ttc" id="agroup__network_html_ad9ecc5b68fb8b8a00e26e4fff273ad9a"><div class="ttname"><a href="group__network.html#ad9ecc5b68fb8b8a00e26e4fff273ad9a">WebRTCPeer::ip_address</a></div><div class="ttdeci">std::string ip_address</div><div class="ttdef"><b>Definition:</b> WebRTCServer.h:95</div></div>
<div class="ttc" id="agroup__network_html_a1eb643c9200b6229942cc5e7bf8c8f56"><div class="ttname"><a href="group__network.html#a1eb643c9200b6229942cc5e7bf8c8f56">WebRTCServer::mRefCount</a></div><div class="ttdeci">uint32_t mRefCount</div><div class="ttdef"><b>Definition:</b> WebRTCServer.h:252</div></div>
<div class="ttc" id="agroup__network_html_classWebRTCServer"><div class="ttname"><a href="group__network.html#classWebRTCServer">WebRTCServer</a></div><div class="ttdoc">WebRTC signalling server for establishing and negotiating connections with peers for bi-directional m...</div><div class="ttdef"><b>Definition:</b> WebRTCServer.h:116</div></div>
<div class="ttc" id="agroup__network_html_a803ff5def7a8be36e0fc0f84513845f8"><div class="ttname"><a href="group__network.html#a803ff5def7a8be36e0fc0f84513845f8">WebRTCPeer::client_context</a></div><div class="ttdeci">SoupClientContext * client_context</div><div class="ttdef"><b>Definition:</b> WebRTCServer.h:88</div></div>
<div class="ttc" id="agroup__network_html_ac3738d6e644d182fd8cd46bb600cebf5"><div class="ttname"><a href="group__network.html#ac3738d6e644d182fd8cd46bb600cebf5">WebRTCPeer::path</a></div><div class="ttdeci">std::string path</div><div class="ttdef"><b>Definition:</b> WebRTCServer.h:94</div></div>
<div class="ttc" id="agroup__network_html_ad44d43978599476a12539802ff434d21"><div class="ttname"><a href="group__network.html#ad44d43978599476a12539802ff434d21">WebRTCServer::onHttpRequest</a></div><div class="ttdeci">static void onHttpRequest(SoupServer *soup_server, SoupMessage *message, const char *path, GHashTable *query, SoupClientContext *client_context, void *user_data)</div></div>
<div class="ttc" id="agroup__network_html_a495cc40be78a8cda04c03e30242ccbfa"><div class="ttname"><a href="group__network.html#a495cc40be78a8cda04c03e30242ccbfa">WebRTCServer::onHttpDefault</a></div><div class="ttdeci">static void onHttpDefault(SoupServer *soup_server, SoupMessage *message, const char *path, GHashTable *query, SoupClientContext *client_context, void *user_data)</div></div>
<div class="ttc" id="agroup__network_html_a77e751082f73a3cd53dd5e6060526d1e"><div class="ttname"><a href="group__network.html#a77e751082f73a3cd53dd5e6060526d1e">WebRTCPeer::ID</a></div><div class="ttdeci">uint32_t ID</div><div class="ttdef"><b>Definition:</b> WebRTCServer.h:91</div></div>
<div class="ttc" id="astructWebRTCServer_1_1HttpRoute_html_aff666687e8ad59351fe3b54e091f115f"><div class="ttname"><a href="structWebRTCServer_1_1HttpRoute.html#aff666687e8ad59351fe3b54e091f115f">WebRTCServer::HttpRoute::flags</a></div><div class="ttdeci">uint32_t flags</div><div class="ttdef"><b>Definition:</b> WebRTCServer.h:219</div></div>
<div class="ttc" id="agroup__network_html_ggabfc2d28deff979bf1183220b57b78bd4a6679628f8219a94c62e06c70190bbf93"><div class="ttname"><a href="group__network.html#ggabfc2d28deff979bf1183220b57b78bd4a6679628f8219a94c62e06c70190bbf93">WEBRTC_PUBLIC</a></div><div class="ttdeci">@ WEBRTC_PUBLIC</div><div class="ttdef"><b>Definition:</b> WebRTCServer.h:66</div></div>
<div class="ttc" id="agroup__network_html_a6b3508b0c436b367cc4a95080df26d9f"><div class="ttname"><a href="group__network.html#a6b3508b0c436b367cc4a95080df26d9f">WebRTCPeer::flags</a></div><div class="ttdeci">uint32_t flags</div><div class="ttdef"><b>Definition:</b> WebRTCServer.h:92</div></div>
<div class="ttc" id="agroup__network_html_ggabfc2d28deff979bf1183220b57b78bd4a819f229f6bfeb116f686451ecdec02f0"><div class="ttname"><a href="group__network.html#ggabfc2d28deff979bf1183220b57b78bd4a819f229f6bfeb116f686451ecdec02f0">WEBRTC_PRIVATE</a></div><div class="ttdeci">@ WEBRTC_PRIVATE</div><div class="ttdef"><b>Definition:</b> WebRTCServer.h:65</div></div>
<div class="ttc" id="agroup__network_html_ggabfc2d28deff979bf1183220b57b78bd4a1a11199124c60fea07d424d28aaa072c"><div class="ttname"><a href="group__network.html#ggabfc2d28deff979bf1183220b57b78bd4a1a11199124c60fea07d424d28aaa072c">WEBRTC_PEER_CLOSED</a></div><div class="ttdeci">@ WEBRTC_PEER_CLOSED</div><div class="ttdef"><b>Definition:</b> WebRTCServer.h:77</div></div>
<div class="ttc" id="agroup__network_html_a74f5de3572ef64def2be980efafd45e8"><div class="ttname"><a href="group__network.html#a74f5de3572ef64def2be980efafd45e8">WebRTCServer::findWebsocketRoute</a></div><div class="ttdeci">WebsocketRoute * findWebsocketRoute(const char *path) const</div></div>
<div class="ttc" id="agroup__network_html_gabfc2d28deff979bf1183220b57b78bd4"><div class="ttname"><a href="group__network.html#gabfc2d28deff979bf1183220b57b78bd4">WebRTCFlags</a></div><div class="ttdeci">WebRTCFlags</div><div class="ttdoc">Flags for route decorators or peer state.</div><div class="ttdef"><b>Definition:</b> WebRTCServer.h:62</div></div>
<div class="ttc" id="agroup__network_html_ggabfc2d28deff979bf1183220b57b78bd4a02bfc67384ac6c23bde10f88d829fb09"><div class="ttname"><a href="group__network.html#ggabfc2d28deff979bf1183220b57b78bd4a02bfc67384ac6c23bde10f88d829fb09">WEBRTC_PEER_STREAMING</a></div><div class="ttdeci">@ WEBRTC_PEER_STREAMING</div><div class="ttdef"><b>Definition:</b> WebRTCServer.h:76</div></div>
<div class="ttc" id="agroup__network_html_a4c5e2f97d7cbd9cf4083aeff416dc5cc"><div class="ttname"><a href="group__network.html#a4c5e2f97d7cbd9cf4083aeff416dc5cc">WebRTCServer::mPort</a></div><div class="ttdeci">uint16_t mPort</div><div class="ttdef"><b>Definition:</b> WebRTCServer.h:251</div></div>
<div class="ttc" id="agroup__network_html_aeb70147a334c7f4aa526523707d316b9"><div class="ttname"><a href="group__network.html#aeb70147a334c7f4aa526523707d316b9">WebRTCServer::Release</a></div><div class="ttdeci">void Release()</div><div class="ttdoc">Release a reference to the server instance.</div></div>
<div class="ttc" id="agroup__network_html_ggabfc2d28deff979bf1183220b57b78bd4a25abb9f2f31e749534b50835291d40f0"><div class="ttname"><a href="group__network.html#ggabfc2d28deff979bf1183220b57b78bd4a25abb9f2f31e749534b50835291d40f0">WEBRTC_MULTI_CLIENT</a></div><div class="ttdeci">@ WEBRTC_MULTI_CLIENT</div><div class="ttdef"><b>Definition:</b> WebRTCServer.h:71</div></div>
<div class="ttc" id="astructWebRTCServer_1_1HttpRoute_html"><div class="ttname"><a href="structWebRTCServer_1_1HttpRoute.html">WebRTCServer::HttpRoute</a></div><div class="ttdef"><b>Definition:</b> WebRTCServer.h:214</div></div>
<div class="ttc" id="agroup__network_html_ggabfc2d28deff979bf1183220b57b78bd4a66831e34a5556976064e4d62e5fcc753"><div class="ttname"><a href="group__network.html#ggabfc2d28deff979bf1183220b57b78bd4a66831e34a5556976064e4d62e5fcc753">WEBRTC_PEER_CONNECTING</a></div><div class="ttdeci">@ WEBRTC_PEER_CONNECTING</div><div class="ttdef"><b>Definition:</b> WebRTCServer.h:74</div></div>
<div class="ttc" id="agroup__network_html_ggabfc2d28deff979bf1183220b57b78bd4aa0b0d71eedf0e9cb89dad480acf2a808"><div class="ttname"><a href="group__network.html#ggabfc2d28deff979bf1183220b57b78bd4aa0b0d71eedf0e9cb89dad480acf2a808">WEBRTC_RECEIVE</a></div><div class="ttdeci">@ WEBRTC_RECEIVE</div><div class="ttdef"><b>Definition:</b> WebRTCServer.h:70</div></div>
<div class="ttc" id="astructWebRTCServer_1_1WebsocketRoute_html_aafe530e21a178e9b052b597ecf6a036e"><div class="ttname"><a href="structWebRTCServer_1_1WebsocketRoute.html#aafe530e21a178e9b052b597ecf6a036e">WebRTCServer::WebsocketRoute::peers</a></div><div class="ttdeci">std::vector&lt; WebRTCPeer * &gt; peers</div><div class="ttdef"><b>Definition:</b> WebRTCServer.h:228</div></div>
<div class="ttc" id="agroup__network_html_ggabfc2d28deff979bf1183220b57b78bd4add7aa55d55c61e54ef02a9d6561b38d3"><div class="ttname"><a href="group__network.html#ggabfc2d28deff979bf1183220b57b78bd4add7aa55d55c61e54ef02a9d6561b38d3">WEBRTC_SEND</a></div><div class="ttdeci">@ WEBRTC_SEND</div><div class="ttdef"><b>Definition:</b> WebRTCServer.h:69</div></div>
<div class="ttc" id="agroup__network_html_a0a9229009aca73f62c363f879255bb38"><div class="ttname"><a href="group__network.html#a0a9229009aca73f62c363f879255bb38">WebRTCServer::HttpListener</a></div><div class="ttdeci">SoupServerCallback HttpListener</div><div class="ttdoc">Function pointer to a callback for handling HTTP requests.</div><div class="ttdef"><b>Definition:</b> WebRTCServer.h:144</div></div>
<div class="ttc" id="agroup__network_html_af3a86d05b7dcb3795cb9a90b87a5fc14"><div class="ttname"><a href="group__network.html#af3a86d05b7dcb3795cb9a90b87a5fc14">WebRTCPeer::connection</a></div><div class="ttdeci">SoupWebsocketConnection * connection</div><div class="ttdef"><b>Definition:</b> WebRTCServer.h:87</div></div>
<div class="ttc" id="agroup__network_html_acf3e2efff7428476b75b74f5199bc06b"><div class="ttname"><a href="group__network.html#acf3e2efff7428476b75b74f5199bc06b">WebRTCServer::mHasHTTPS</a></div><div class="ttdeci">bool mHasHTTPS</div><div class="ttdef"><b>Definition:</b> WebRTCServer.h:249</div></div>
<div class="ttc" id="agroup__network_html_a32e99e59a4d0c536e7edcfbbd2dcdaee"><div class="ttname"><a href="group__network.html#a32e99e59a4d0c536e7edcfbbd2dcdaee">WebRTCServer::IsThreaded</a></div><div class="ttdeci">bool IsThreaded() const</div><div class="ttdoc">Return true if the server is running in it's own thread.</div><div class="ttdef"><b>Definition:</b> WebRTCServer.h:189</div></div>
<div class="ttc" id="astructWebRTCServer_1_1WebsocketRoute_html"><div class="ttname"><a href="structWebRTCServer_1_1WebsocketRoute.html">WebRTCServer::WebsocketRoute</a></div><div class="ttdef"><b>Definition:</b> WebRTCServer.h:222</div></div>
<div class="ttc" id="astructWebRTCServer_1_1WebsocketRoute_html_a8ca5ffb081600a7f8f09b63be3d8b030"><div class="ttname"><a href="structWebRTCServer_1_1WebsocketRoute.html#a8ca5ffb081600a7f8f09b63be3d8b030">WebRTCServer::WebsocketRoute::path</a></div><div class="ttdeci">std::string path</div><div class="ttdef"><b>Definition:</b> WebRTCServer.h:224</div></div>
<div class="ttc" id="agroup__network_html_ggabfc2d28deff979bf1183220b57b78bd4ae076480a0c0d9a717f926b7cda1744fd"><div class="ttname"><a href="group__network.html#ggabfc2d28deff979bf1183220b57b78bd4ae076480a0c0d9a717f926b7cda1744fd">WEBRTC_AUDIO</a></div><div class="ttdeci">@ WEBRTC_AUDIO</div><div class="ttdef"><b>Definition:</b> WebRTCServer.h:67</div></div>
<div class="ttc" id="agroup__network_html_a357507a6bd6da2cb41e90148f226b740"><div class="ttname"><a href="group__network.html#a357507a6bd6da2cb41e90148f226b740">WebRTCServer::mSoupServer</a></div><div class="ttdeci">SoupServer * mSoupServer</div><div class="ttdef"><b>Definition:</b> WebRTCServer.h:243</div></div>
<div class="ttc" id="agroup__network_html_adbcd3355338382847a31e5e49f5caf97"><div class="ttname"><a href="group__network.html#adbcd3355338382847a31e5e49f5caf97">WebRTCServer::HasHTTPS</a></div><div class="ttdeci">bool HasHTTPS() const</div><div class="ttdoc">Return true if the server is using HTTPS.</div><div class="ttdef"><b>Definition:</b> WebRTCServer.h:183</div></div>
<div class="ttc" id="agroup__network_html_a0d039ca61131cbe7accdce277a5629a9"><div class="ttname"><a href="group__network.html#a0d039ca61131cbe7accdce277a5629a9">WebRTCServer::findHttpRoute</a></div><div class="ttdeci">HttpRoute * findHttpRoute(const char *path) const</div></div>
<div class="ttc" id="astructWebRTCServer_1_1HttpRoute_html_a3f0724d2bfb6b5e06aa28e91879c6444"><div class="ttname"><a href="structWebRTCServer_1_1HttpRoute.html#a3f0724d2bfb6b5e06aa28e91879c6444">WebRTCServer::HttpRoute::callback</a></div><div class="ttdeci">HttpListener callback</div><div class="ttdef"><b>Definition:</b> WebRTCServer.h:217</div></div>
<div class="ttc" id="agroup__network_html_a49631104e63bd4368ecb0217c402b4e7"><div class="ttname"><a href="group__network.html#a49631104e63bd4368ecb0217c402b4e7">WebRTCServer::Create</a></div><div class="ttdeci">static WebRTCServer * Create(uint16_t port=WEBRTC_DEFAULT_PORT, const char *stun_server=WEBRTC_DEFAULT_STUN_SERVER, const char *ssl_cert=NULL, const char *ssl_key=NULL, bool threaded=true)</div><div class="ttdoc">Create a WebRTC server on this port.</div></div>
<div class="ttc" id="agroup__network_html_a229d7bef55546e26fe49056465616831"><div class="ttname"><a href="group__network.html#a229d7bef55546e26fe49056465616831">WebRTCServer::mThread</a></div><div class="ttdeci">Thread * mThread</div><div class="ttdef"><b>Definition:</b> WebRTCServer.h:255</div></div>
<div class="ttc" id="agroup__network_html_a3afcb67c4dfc05a2cf80bac068b97146"><div class="ttname"><a href="group__network.html#a3afcb67c4dfc05a2cf80bac068b97146">WebRTCServer::mHttpRoutes</a></div><div class="ttdeci">std::vector&lt; HttpRoute * &gt; mHttpRoutes</div><div class="ttdef"><b>Definition:</b> WebRTCServer.h:240</div></div>
<div class="ttc" id="agroup__network_html_a2221f9f1ba155c17f6d1f4e99057f7ba"><div class="ttname"><a href="group__network.html#a2221f9f1ba155c17f6d1f4e99057f7ba">WebRTCServer::freeRoute</a></div><div class="ttdeci">void freeRoute(HttpRoute *route)</div></div>
<div class="ttc" id="agroup__network_html_ac49ab53764ab184efe91a8c7040be7dc"><div class="ttname"><a href="group__network.html#ac49ab53764ab184efe91a8c7040be7dc">WebRTCServer::ProcessRequests</a></div><div class="ttdeci">bool ProcessRequests(bool blocking=false)</div><div class="ttdoc">Process incoming requests on the server.</div></div>
<div class="ttc" id="agroup__network_html_aed89521ec525e2a3c24757d2444f388d"><div class="ttname"><a href="group__network.html#aed89521ec525e2a3c24757d2444f388d">WebRTCServer::init</a></div><div class="ttdeci">bool init()</div></div>
<div class="ttc" id="agroup__network_html_ac00aed03b4a8aa98ae5b3f5088a80f9a"><div class="ttname"><a href="group__network.html#ac00aed03b4a8aa98ae5b3f5088a80f9a">WebRTCServer::mSSLCertFile</a></div><div class="ttdeci">std::string mSSLCertFile</div><div class="ttdef"><b>Definition:</b> WebRTCServer.h:246</div></div>
<div class="ttc" id="agroup__network_html_ggabfc2d28deff979bf1183220b57b78bd4a98eb7641bdbb1edc5fe77bdd3e3650ab"><div class="ttname"><a href="group__network.html#ggabfc2d28deff979bf1183220b57b78bd4a98eb7641bdbb1edc5fe77bdd3e3650ab">WEBRTC_VIDEO</a></div><div class="ttdeci">@ WEBRTC_VIDEO</div><div class="ttdef"><b>Definition:</b> WebRTCServer.h:68</div></div>
<div class="ttc" id="agroup__network_html_ggabfc2d28deff979bf1183220b57b78bd4ad0e08bdd9c1c0a10e019235f9e341278"><div class="ttname"><a href="group__network.html#ggabfc2d28deff979bf1183220b57b78bd4ad0e08bdd9c1c0a10e019235f9e341278">WEBRTC_PEER_CONNECTED</a></div><div class="ttdeci">@ WEBRTC_PEER_CONNECTED</div><div class="ttdef"><b>Definition:</b> WebRTCServer.h:75</div></div>
<div class="ttc" id="agroup__network_html_af67a297932aefb380d6f691c23e2a4e0"><div class="ttname"><a href="group__network.html#af67a297932aefb380d6f691c23e2a4e0">WebRTCServer::runThread</a></div><div class="ttdeci">static void * runThread(void *user_data)</div></div>
<div class="ttc" id="agroup__network_html_ga0168a2334e9e1e13b83a665c8cce0742"><div class="ttname"><a href="group__network.html#ga0168a2334e9e1e13b83a665c8cce0742">WEBRTC_DEFAULT_PORT</a></div><div class="ttdeci">#define WEBRTC_DEFAULT_PORT</div><div class="ttdoc">Default HTTP/websocket port used by the WebRTC server.</div><div class="ttdef"><b>Definition:</b> WebRTCServer.h:42</div></div>
<div class="ttc" id="astructWebRTCServer_1_1WebsocketRoute_html_ae663b161b5c3bb3177f0116f4c71ad5c"><div class="ttname"><a href="structWebRTCServer_1_1WebsocketRoute.html#ae663b161b5c3bb3177f0116f4c71ad5c">WebRTCServer::WebsocketRoute::flags</a></div><div class="ttdeci">uint32_t flags</div><div class="ttdef"><b>Definition:</b> WebRTCServer.h:227</div></div>
<div class="ttc" id="agroup__network_html_aa4b1d80e74f1bcdcd5e5366ca36e50a2"><div class="ttname"><a href="group__network.html#aa4b1d80e74f1bcdcd5e5366ca36e50a2">WebRTCServer::onWebsocketClosed</a></div><div class="ttdeci">static void onWebsocketClosed(SoupWebsocketConnection *connection, void *user_data)</div></div>
<div class="ttc" id="agroup__network_html_a0b94ce7618d8d4c7a8d4e66f674f958e"><div class="ttname"><a href="group__network.html#a0b94ce7618d8d4c7a8d4e66f674f958e">WebRTCServer::onWebsocketMessage</a></div><div class="ttdeci">static void onWebsocketMessage(SoupWebsocketConnection *connection, SoupWebsocketDataType data_type, GBytes *message, void *user_data)</div></div>
<div class="ttc" id="agroup__threads_html_classThread"><div class="ttname"><a href="group__threads.html#classThread">Thread</a></div><div class="ttdoc">Thread class for launching an asynchronous operating-system dependent thread.</div><div class="ttdef"><b>Definition:</b> Thread.h:44</div></div>
<div class="ttc" id="astructWebRTCServer_1_1WebsocketRoute_html_ae009455262ee0547eec6cc6d5c3fc3a1"><div class="ttname"><a href="structWebRTCServer_1_1WebsocketRoute.html#ae009455262ee0547eec6cc6d5c3fc3a1">WebRTCServer::WebsocketRoute::callback</a></div><div class="ttdeci">WebsocketListener callback</div><div class="ttdef"><b>Definition:</b> WebRTCServer.h:225</div></div>
<div class="ttc" id="agroup__network_html_a67b529a7a9e37f892fb93b7409a2035f"><div class="ttname"><a href="group__network.html#a67b529a7a9e37f892fb93b7409a2035f">WebRTCServer::mWebsocketRoutes</a></div><div class="ttdeci">std::vector&lt; WebsocketRoute * &gt; mWebsocketRoutes</div><div class="ttdef"><b>Definition:</b> WebRTCServer.h:241</div></div>
<div class="ttc" id="agroup__network_html_structWebRTCPeer"><div class="ttname"><a href="group__network.html#structWebRTCPeer">WebRTCPeer</a></div><div class="ttdoc">Remote peer that has connected.</div><div class="ttdef"><b>Definition:</b> WebRTCServer.h:85</div></div>
<div class="ttc" id="agroup__network_html_a91c2b446fe98224e7bd66693ccd19e21"><div class="ttname"><a href="group__network.html#a91c2b446fe98224e7bd66693ccd19e21">WebRTCServer::WebRTCServer</a></div><div class="ttdeci">WebRTCServer(uint16_t port, const char *stun_server, const char *ssl_cert_file, const char *ssl_key_file, bool threaded)</div></div>
<div class="ttc" id="agroup__network_html_ga99b10c89b7c09a0c753f241f9e74c894"><div class="ttname"><a href="group__network.html#ga99b10c89b7c09a0c753f241f9e74c894">WEBRTC_DEFAULT_STUN_SERVER</a></div><div class="ttdeci">#define WEBRTC_DEFAULT_STUN_SERVER</div><div class="ttdoc">Default STUN server used for WebRTC.</div><div class="ttdef"><b>Definition:</b> WebRTCServer.h:49</div></div>
<div class="ttc" id="astructWebRTCServer_1_1HttpRoute_html_a920c9860af27d158470f42ead7cb91df"><div class="ttname"><a href="structWebRTCServer_1_1HttpRoute.html#a920c9860af27d158470f42ead7cb91df">WebRTCServer::HttpRoute::user_data</a></div><div class="ttdeci">void * user_data</div><div class="ttdef"><b>Definition:</b> WebRTCServer.h:218</div></div>
<div class="ttc" id="astructWebRTCServer_1_1WebsocketRoute_html_a2a1b71fad54d8716f06d721451fc2e4f"><div class="ttname"><a href="structWebRTCServer_1_1WebsocketRoute.html#a2a1b71fad54d8716f06d721451fc2e4f">WebRTCServer::WebsocketRoute::user_data</a></div><div class="ttdeci">void * user_data</div><div class="ttdef"><b>Definition:</b> WebRTCServer.h:226</div></div>
<div class="ttc" id="agroup__network_html_a7d50ecf2c197872b45d86adc5aeba0da"><div class="ttname"><a href="group__network.html#a7d50ecf2c197872b45d86adc5aeba0da">WebRTCServer::onWebsocketOpened</a></div><div class="ttdeci">static void onWebsocketOpened(SoupServer *server, SoupWebsocketConnection *connection, const char *path, SoupClientContext *client_context, void *user_data)</div></div>
<!-- start footer part -->
<div id="nav-path" class="navpath"><!-- id is needed for treeview function! -->
  <ul>
    <li class="navelem"><a class="el" href="dir_54a0acf6da04fe2ed9410b4c6369bc5d.html">jetson-utils</a></li><li class="navelem"><a class="el" href="WebRTCServer_8h.html">WebRTCServer.h</a></li>
    <li class="footer">Generated on Tue Mar 28 2023 14:27:58 for Jetson Inference by
    <a href="http://www.doxygen.org/index.html">
    <img class="footer" src="doxygen.png" alt="doxygen"/></a> 1.8.17 </li>
  </ul>
</div>
</body>
</html>
